package com.loukou.lkt.lkt.service;

import java.util.Date;
import java.util.List;

import com.loukou.lkt.lkt.bo.AllocationOrderBo;
import com.loukou.lkt.lkt.bo.PageList;
import com.loukou.lkt.lkt.entity.AllocationOrder;
import com.loukou.lkt.lkt.entity.AllocationOrderDetail;
import com.loukou.lkt.lkt.req.AllocationStockRealReq;
import com.loukou.lkt.lkt.req.WhPurchaseOrderDto;
import com.loukou.lkt.lkt.resp.RespDto;

public interface AllocationOrderService {
	/**
	 * notMyWarehouseIds:非当前用户管辖的仓库ids
	 * */
	public RespDto<PageList<AllocationOrderBo>> getAllocationOrderlst(
			String orderCode,int orderState, int outWarehouseId,int inWarehouseId,List<Integer> myWarehouseIds,
			String outUserName,Date startCreateTime,Date endCreateTime,
			Date startOutTime,Date endOutTime,Date startInTime,Date endInTime,int pageIndex,int pageSize);
	
    public List<AllocationOrderDetail> getDetailsByOrderId(int orderId);
    
    public void saveAllocation(AllocationOrder allocation,List<AllocationOrderDetail> details,int outWarehouseIdOld);
    
    public AllocationOrder getAllocationOrder(String orderCode);
    public AllocationOrder getAllocationOrderById(int id);
    
    /**
     * LKT将调拨单传给WMS
     * @param allocationOrderResp
     * @return
     */
    public RespDto<String> sendAllocationOrderToWms(int allocationOrderId);
    
    
    
    /**
     * WMS告诉LKT真实的调拨数量
     * @param stockRealList
     * @return
     */
    public RespDto<String> wmsRealStockInOut(AllocationStockRealReq allocationStockReal);
    
    public void updateState(int orderId,int state);
    
    public void checkAndUpdateState(int orderId,int outWarehouseId,List<AllocationOrderDetail> details);
    
    AllocationOrderDetail getDetail(int orderId,int outGoodsSpecId);

    /**
     * 接收微仓采购单生成调拨单******暂时不做*******
     * @param req
     * @return
     */
	public RespDto<String> receiveWhPurchaseOrder(WhPurchaseOrderDto req);
	
	public void noticeWmsIn();
	
	public void noticeWmsOut();
}
